var table;
var $;
layui.use(['layer','form','table'],function(){
    table=layui.table;
    $=layui.$;

    showtables();

});
//展示审核详情
function showtables(){
    var id=$("input[name='productId']").val();
    $.post("/OpeHome/getAuditDetails",{"productId":id,"type":3}, function (data) {
        tables(data.obj);
        console.log(data.obj);
    });
};
//审核详情表格
function tables(data){
    table.render({
        elem:"#table_id",//容器
        data:data,
        title:"审核详情",
        limit:10,//分页显示条数
        toolbar:false,
        page:true,
        cols:[[//定义列
            //{type:'checkbox',align:'center',width:50},//复选框靠左
            {title:'序号',align:'center',width:60,templet:function(data){
                    return data.LAY_INDEX;
                }},
            {field:"time",title:"审核时间",align:'center',width:240,templet:function(d){
                    var date=d.time;
                    date = date.slice(0, date.indexOf("."));
                    date = date.replaceAll('T',' ');
                    return date;
                }},
            {field:"name",title:"审核人员",align:'center',width:130},
            {field:"result",title:"审核结果",align:'center',width:110},
            {field:"details",title:"反馈详情",align:'center',width:264}
        ]]
    });
}